from django.contrib import admin

# Register your models here.

from .models import MovieStaffCategory
from .models import MovieCountry
from .models import MovieTypeCategory
from .models import MovieKindCategory
from .models import MovieStaff
from .models import MovieDetail
from .models import MovieAllStaffs
from .models import MovieHall
from .models import FilmSchedule
from .models import MovieHallSeat
from .models import TicketSeat
from .models import Cinema


class MovieStaffCategoryAdmin(admin.ModelAdmin):
    pass


class MovieCountryAdmin(admin.ModelAdmin):
    pass


class MovieTypeCategoryAdmin(admin.ModelAdmin):
    pass


class MovieKindCategoryAdmin(admin.ModelAdmin):
    pass


class MovieStaffAdmin(admin.ModelAdmin):
    pass


class MovieDetailAdmin(admin.ModelAdmin):
    # fieldsets = (
    #     (None, {
    #         'fields': (('name', 'status'),)
    #     }),
    #     ('options', {
    #         'classes': ('collapse',),
    #         'fields': ('view_num', 'is_banner'),
    #     }),
    # )
    list_display = ('id', 'name', 'status')
    list_display_links = ('name',)
    list_editable = ("status",)

    list_filter = ('kind_category',)

    search_fields = ['name']

    # class Img(admin.TabularInline):
    #     model = MovieKindCategory
    #
    # inlines = [Img]


class MovieAllStaffsAdmin(admin.ModelAdmin):
    pass


class MovieHallAdmin(admin.ModelAdmin):
    pass


class FilmScheduleAdmin(admin.ModelAdmin):
    list_display = ('id', 'movie', 'movie_hall', 'start_time','end_time','price')
    list_editable = ('price',)


class MovieHallSeatAdmin(admin.ModelAdmin):
    list_display = ('id', 'row', 'col', 'movie_hall')


class TicketSeatAdmin(admin.ModelAdmin):
    list_display = ('id','movie_hall_seat','film_schedule','status')
    list_editable = ('status',)


class CinemaAdmin(admin.ModelAdmin):
    pass


admin.site.register(MovieTypeCategory, MovieTypeCategoryAdmin)
admin.site.register(MovieKindCategory, MovieKindCategoryAdmin)
admin.site.register(MovieStaffCategory, MovieStaffCategoryAdmin)
admin.site.register(MovieStaff, MovieStaffAdmin)
admin.site.register(MovieCountry, MovieCountryAdmin)
admin.site.register(MovieDetail, MovieDetailAdmin)
admin.site.register(MovieAllStaffs, MovieAllStaffsAdmin)
admin.site.register(MovieHall, MovieHallAdmin)
admin.site.register(FilmSchedule, FilmScheduleAdmin)
admin.site.register(MovieHallSeat, MovieHallSeatAdmin)
admin.site.register(TicketSeat, TicketSeatAdmin)
admin.site.register(Cinema, CinemaAdmin)

"""
<br>出至今，观众们对于三组明星制作人的选人套路也有所了解，吴亦凡还是维持了一贯高标准严要求的作风，邓紫棋和潘玮柏则是看对眼就赶紧“下手”，那句“我帮你唱hook”之洗脑堪比“你有freestyle吗”，但是对于热狗和张震岳来讲似乎并没有一套固定的策略，更像是一种“谈恋爱”模式，全凭感觉和眼缘，“从一开始其实大家都在试探，都在猜测，哪些选手是会选择我们的，我们喜欢哪些选手，选手也很聪明，他不会贸然选择一个可能不会选你的制作人。所以大家都是在追寻，在互相契合，我喜欢你，
你喜欢我，<em>要情投</em>意合，我觉得这个感觉很重要”
<img src='http://p1.meituan.net/movie/3872e7be694b48457c4c44df74e9a801612732.jpg@750w_1l'>


"""

"""
1.增添一个排片
2.排片的时候,必须有一个影厅
3.影厅里面就有座位信息

解决:增加排片的时候,把他所属的影厅的里面的所有座位生成出来
"""
